import Vue from 'vue'
import Router from 'vue-router'  // 引入定义好的router
import Welcome from '../views/Welcome.vue'
import Login from '../views/user/Login.vue'
import Home from '../views/Home.vue'
import Cart from '../views/order/Cart.vue'
import MyAccount from '../views/user/MyAccount.vue'
import Category from '../views/category/Category.vue'
import Product from '../views/category/Product.vue'


Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: 'Welcome',
      component: Welcome,

    },
    {
      path: '/home',
      name: 'Home',
      component:Home,
      
    },
    {
      path: '/login',
      name: 'Login',
      component: Login,
    },
    {
      path: '/myAccount',
      name: 'MyAccount',
      component:  MyAccount,
    },
    
    {
      path: '/cart',
      name: 'Cart',
      component:Cart,
    },
    {
      path: '/catalog/category/:categoryId',
      name: 'Category',
      component: Category,
    },
    {
      path: '/catalog/category/:categoryId',
      name: "Product",
      component: Product
    }
    
  
  ]
})

